package cn.zb.zbrhback.basic.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "返回的类型",description = "所有接口的返回")
public class AjaxResult {
    @ApiModelProperty(value = "请求是否成功")
    private boolean success = true;
    @ApiModelProperty(value = "请求返回提示信息")
    private String message = "请求成功";
    @ApiModelProperty(value = "请求返回数据")
    private Object data;

    public static AjaxResult me(){
        return new AjaxResult();
    }

    public boolean isSuccess() {
        return success;
    }

    public AjaxResult setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public Object getData() {
        return data;
    }

    public AjaxResult setData(Object data) {
        this.data = data;
        return this;
    }

}
